package com.wuyixu.service.impl;

import java.util.List;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wuyixu.dao.BrandMapper;
import com.wuyixu.domain.Brand;
import com.wuyixu.service.BrandService;
@Service(interfaceClass=BrandService.class)
public class BrandServiceImpl implements BrandService{
	@Autowired
	private BrandMapper brandMapper;
	@Override
	public int add(Brand brand) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int update(Brand brand) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int del(Integer[] ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public PageInfo<Brand> list(Brand brand,Integer pageNum,Integer pageSize) {
		PageHelper.startPage(pageNum, pageSize);
		List<Brand> list = brandMapper.list(brand);
		return new PageInfo<Brand>(list);
	}

	@Override
	public List<Brand> queryAll() {
		// TODO Auto-generated method stub
		return brandMapper.queryAll();
	}

	@Override
	public Brand getById(Integer id) {
		// TODO Auto-generated method stub
		return brandMapper.getById(id);
	}

}
